import pandas as pd
import calendar
import matplotlib.pylab as plt

plt.style.use(['grid'])

data = pd.read_csv('data/AirPassengers.csv', sep=",")
data['Month'] = pd.to_datetime([str(list(calendar.month_abbr).index(
    month[:3])) + month[3:] for month in data['Month']])
data = data.set_index('Month')
print(data)

plt.plot(data, 'b-')
plt.title('Airpassenger Time Series')
plt.xlabel('Month')
plt.ylabel('Passengers')
plt.savefig('Time Series')
